home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!girvan.demon.co.uk
- From: Allan Girvan <allan@girvan.demon.co.uk>
- Newsgroups: comp.sys.amiga.misc
- Subject: Re: Amigados - checking for a file
- Date: Sat, 6 Apr 96 02:09:44 GMT
- Message-ID: <9604060209.AA00113@girvan.demon.co.uk>
- References: <401.6670T240T431@nibelung.demon.co.uk>
- X-NNTP-Posting-Host: girvan.demon.co.uk
- X-Newsreader: ADMaN 1.7 Copyright 1995 S.T.Brown
- X-Mail2News-Path: disperse.demon.co.uk!post.demon.co.uk!girvan.demon.co.uk
-
- On Sat, 06 Apr 96, Barry Shilliday wrote:
-
- > What would be the format to check the existence of a file in a script for dos?
- > I would have thought something like this:
- >
- > If EXISTS blah:filename
- > dowhatever
- > else
- > dothatinstead
- > endif
- > endif
- >
- > but this doesn't work.
-
- You've got one "endif" too many there! Try deleting the first one.
-
- This works:-
-
-
-
- .key file
- If exists <file>
- echo "Found it"
- else
- echo "No trace"
- endif
-
-
-
- It takes the filename as an argument.
-
- Cheers,
-
-
- Allan.
- --
- | EMail - allan@girvan.demon.co.uk | Running on // You Know it |
- | Greetings from Glasgow, Scotland | AMIGA 1200 \X/ makes sense |
-